Skip to content

Create sudoko.cpp#599

Closed
aditya-chouksey wants to merge 1 commit into
Open-Source-you:mainfrom
aditya-chouksey:patch-2
Closed

Create sudoko.cpp#599
aditya-chouksey wants to merge 1 commit into
Open-Source-you:mainfrom
aditya-chouksey:patch-2

Conversation

@aditya-chouksey
Copy link
Copy Markdown

The grid uses 0 to represent empty cells.

The isSafe() function ensures no duplicates in a row, column, or 3×3 box.

The solveSudoku() uses backtracking:

Tries a number 1–9 in each empty cell.

If a number works, moves to the next cell.

If stuck, it backtracks and tries a different number.

The final grid is printed as the solution.

The grid uses 0 to represent empty cells.

The isSafe() function ensures no duplicates in a row, column, or 3×3 box.

The solveSudoku() uses backtracking:

Tries a number 1–9 in each empty cell.

If a number works, moves to the next cell.

If stuck, it backtracks and tries a different number.

The final grid is printed as the solution.
@aditya-chouksey aditya-chouksey closed this by deleting the head repository May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant